# 导包
import pytest

from api.add666 import add


# case01: 1 + 1 = 2 ==> (1, 1, 2)
# case02: 1 + 0 = 1 ==> (1, 0, 1)
# case03: 0 + 0 = 0 ==> (0, 0, 0)


# 创建测试类
class TestAddAPI:
    @pytest.mark.parametrize("a, b, c", [(1, 1, 2), (1, 0, 1), (0, 0, 0)])
    def test(self, a, b, c):
        # 获取实际结果
        result = add(x=a, y=b)
        # 打印实际结果
        print(result)
        # 断言
        assert result == c
